var up = false;
var down = false;

function thumbsup() {
  if (up != true) {
    document["thumbsUp"].src="images/thumbs/upSelected.jpg";
    document["thumbsDown"].src="images/thumbs/down.jpg";
    up = true;
    down = false;
  }
  else
  {
    thumbsReset();
  }
}

function thumbsdown() {
  if (down != true) {
    document["thumbsUp"].src="images/thumbs/up.jpg";
    document["thumbsDown"].src="images/thumbs/downSelected.jpg";
    down = true;
    up = false;
  }
  else
  {
    thumbsReset();
  }
}

function thumbsReset() {
  document["thumbsUp"].src="images/thumbs/up.jpg";
  document["thumbsDown"].src="images/thumbs/down.jpg";
  up = false;
  down = false;
}

    var playing = false;
    function playPause() {
      if (playing == false)
      {
        document["playpause"].src = "images/pause.jpg"
        playing=true;
		$("#jquery_jplayer_1").jPlayer("play");
      }
      else if (playing == true)
      {
        document["playpause"].src = "images/play.jpg"
        playing=false;
		$("#jquery_jplayer_1").jPlayer("pause");
      }
    }
    
    var myCloud = false;
    function cloudsVisible(){
      if (myCloud == false) {
        $().toastmessage('showNoticeToast', "MyCloud Activated. Songs from your cloud have been added to the play queue");
        myCloud = true;
        document["cloud1"].style.visibility='visible';
        document["cloud2"].style.visibility='visible';
      }
      else {
        myCloud = false;
        $().toastmessage('showNoticeToast', "MyCloud deactivated.");
        document["cloud1"].style.visibility='hidden';
        document["cloud2"].style.visibility='hidden';
      }
    }